package com.dream.xiaobo.service;



import com.dream.xiaobo.entity.Item;
import com.dream.xiaobo.entity.Orders;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.List;

/**
 * @author xiaobo
 * @date 2021/9/2 - 15:08
 */
public interface OrdersService {

    /**
     * 创建订单业务逻辑接口
     * @param uId
     * @param sum
     * @param aId
     * @throws IllegalAccessException
     * @throws SQLException
     * @throws InvocationTargetException
     */
    void createOrder(String uId, String sum, String aId) throws IllegalAccessException, SQLException, InvocationTargetException;

    /**
     * 查询订单信息业务逻辑接口（根据用户Id）
     * @param uId
     * @return
     * @throws IllegalAccessException
     * @throws SQLException
     * @throws InvocationTargetException
     * @throws ParseException
     */
    List<Orders> findOrderByUId(Integer uId) throws IllegalAccessException, SQLException, InvocationTargetException, ParseException;

    /**
     * 查询订单信息业务逻辑接口（根据订单Id）
     * @param oId
     * @return
     * @throws IllegalAccessException
     * @throws SQLException
     * @throws InvocationTargetException
     */
    Orders findOrderByOId(String oId) throws IllegalAccessException, SQLException, InvocationTargetException;

    /**
     * 更新订单业务逻辑接口（根据订单Id）
     * @param oId
     * @throws SQLException
     */
    void updateOrderByOId(String oId) throws SQLException;

    /**
     * 查询订单业务逻辑接口
     * @return
     * @throws SQLException
     * @throws InvocationTargetException
     * @throws IllegalAccessException
     */
    List<Orders> findOrder() throws SQLException, InvocationTargetException, IllegalAccessException;

    /**
     * 更新订单业务逻辑接口（发货）
     * @param oId
     * @throws SQLException
     */
    void updateOrderByOIdHair(String oId) throws SQLException;

    /**
     * 更新订单业务逻辑接口（收货）
     * @param oId
     * @throws SQLException
     */
    void updateORderByOIdCollect(String oId) throws SQLException;
}
